{extend name="../front" /}
{block name="main"}
<main class="container">
  <div class="card card-detail">
    <div class="card-body">
      <h1 class="card-title">{$detail_name}{if $detail_recommend}<span class="badge bg-danger small ms-1">推荐</span>{/if}</h1>
      {if $detail_title}<p class="text-muted small mb-2">{$detail_title}</p>{/if}
      <p class="small border-bottom pb-1">
        <i class="me-1 bi-alarm"></i>{$detail_update_time}
        <i class="me-1 ms-2 bi-eye"></i>{$detail_view|number_format}
        <a class="ms-2" href="javascript:;" data-toggle="copy" data-url="{$shareUrl}"><i class="bi-share-fill me-1"></i>复制链接</a>
        {foreach name="type" item="item"}
        <a class="ms-2" href="{:xfUrlType($item)}"><i class="bi-hash"></i>{$item.type_name}</a>
        {/foreach}
        {foreach name="tag" item="item"}
        <a class="ms-2" href="{:xfUrlTag($item)}"><i class="bi-tag"></i>{$item.tag_name}</a>
        {/foreach}
      </p>
      {if $detail_ai}{$detail_ai|xfMarkdown|raw}{else/}{$detail_content|xfMarkdown|raw}{/if}
      {volist name=":model('blog/Index','loglic')->getPrevs($detail_id)" id="item"}<div class="text-truncate mt-2">上一篇：<a class="text-muted" href="{:xfUrlDetail($item)}" title="{$item.detail_name}" data-toggle="prev">{$item.detail_name}</a></div>{/volist}
      {volist name=":model('blog/Index','loglic')->getNexts($detail_id)" id="item"}<div class="text-truncate mt-2">下一篇：<a class="text-muted" href="{:xfUrlDetail($item)}" title="{$item.detail_name}" data-toggle="next">{$item.detail_name}</a></div>{/volist}
    </div>
  </div>
  <div class="card mt-3">
    <div class="card-body card-with">
      <h6 class="card-title mb-2">最近更新</h6>
      {volist name=":model('blog/Index','loglic')->items(10,'detail_create_time')" id="item"}
      <dl>
        <dt class="fw-light d-flex align-items-center">
          <span class="dot"></span>
          <span class="text-muted small ps-1">{$item.detail_create_time|xfSubstr=0,8,false}</span>
        </dt>
        <dd><a href="{:xfUrlDetail($item)}" title="{$item.detail_name}">{$item.detail_name}</a></dd>
      </dl>
      {/volist}
    </div>
  </div>
</main>
{/block}